package com.cloud.mall.oms.service;

import com.cloud.mall.api.CommonPage;
import com.cloud.mall.base.BaseResponse;
import com.cloud.mall.oms.input.OmsOrderReturnReasonInpDTO;
import com.cloud.mall.oms.out.OmsOrderReturnReasonOut;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import java.util.List;


@Api(tags = "退货原因管理")
@RequestMapping("/returnReason")
public interface OmsOrderReturnReasonService {

    @ApiOperation("添加退货原因")
    @PostMapping("/create")
    BaseResponse create(@RequestBody OmsOrderReturnReasonInpDTO returnReason);

    @ApiOperation("修改退货原因")
    @PostMapping("/update/{id}")
    BaseResponse update(@PathVariable("id") Long id,@RequestBody OmsOrderReturnReasonInpDTO returnReason);

    @ApiOperation(value = "获取单个退货原因详情信息")
    @GetMapping("/{id}")
    BaseResponse<OmsOrderReturnReasonOut> getItem(@PathVariable("id") Long id);

    @ApiOperation(value = "批量删除退货原因")
    @PostMapping("/delete")
    BaseResponse delete(@RequestParam("ids") List<Long> ids);

    @ApiOperation("修改退货原因启用状态")
    @GetMapping("/update/status")
    BaseResponse updateStatus(@RequestParam(value = "status") Integer status,
                             @RequestParam("ids") List<Long> ids);

    @ApiOperation("分页查询全部退货原因")
    @GetMapping("/list/{cid}")
    BaseResponse<CommonPage<OmsOrderReturnReasonOut>> list(@RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                          @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum);


}
